package com.etrans.baf.analyse.task.track.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.etrans.baf.analyse.task.track.service.TouristVehicleOutService;
import com.etrans.baf.analyse.util.DateUtils;

@Component("touristVehicleOutAnalyse")
public class TouristVehicleOutAnalyse {

	@Autowired
	private TouristVehicleOutService touristVehicleOutService;
	
	static final Logger logger = LoggerFactory.getLogger(TouristVehicleOutAnalyse.class);

	public void timer(){
		logger.info("开始分析----------------");
		analyse();
		logger.info("分析结束");
	}
	
	private void analyse(){
		try {
			String analyse_date = DateUtils.getAnalyseDate(null,0);
			touristVehicleOutService.touristVehicleOut(analyse_date);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
}
